const request = require('../../utils/request.js');

/**
 * @description 酷狗音乐歌单
 */
module.exports = (req, res) => {
  let host = 'm.kugou.com';
  let path = '/plist/index&json=true';
  let data = {};
  request
    .httpGet({ host, data, path })
    .then(function (body) {
      res.api_success(JSON.parse(body)['plist']);
    })
    .catch(function (err) {
      res.api_error('服务器异常', 500);
      console.log(err);
    });
};
